<template>
  <div>
    单体成本分摊表体
    <template>
      <div>
        <el-table :data="buildingNumberList" border stripe height="860" :summary-method="getSummaries" show-summary
          :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
          <el-table-column prop="" label="单体成本之专属成本分摊计算表（四）">
            <template slot-scope="scope">
              <el-table :data="scope.row.list" :show-header="scope.$index === 0" :header-cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}">
                <el-table-column fixed prop="number" label="楼号">
                </el-table-column>
                <el-table-column prop="type_title" label="业态">
                </el-table-column>
                <el-table-column prop="_1" label="土地使用权支付金额" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="_2" label="土地征用及拆迁补偿费" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="_3" label="前期工程费" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="_4" label="建筑安装工程费" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="_5" label="基础设施费" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="_6" label="配套设施费" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="_7" label="开发间接费" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="_8" label="不予扣除成本" :formatter="stateFormat">
                </el-table-column>
                <el-table-column prop="sum_exclusive" label="合计" :formatter="stateFormat">
                </el-table-column>


              </el-table>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </template>
  </div>
</template>

<script>
import calculateApi from '@/api/calculate'

export default {
  data() {
    return {
      calculate_id: '',
      buildingNumberList: []
    }

  },
  methods: {
    getCalculateBuildingNumberList() {
      calculateApi.getCalculateBuildingNumberList(this.calculate_id).then(response => {
        this.buildingNumberList = response.data.list;
      })
    },
  },
  created() {
    var query = this.$route.query;
    if (query.id) {
      this.calculate_id = query.id;
    }

    this.getCalculateBuildingNumberList();
  },
}
</script>

<style></style>